<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CUDNN Frontend API: nlohmann::detail::dtoa_impl Namespace Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CUDNN Frontend API
   &#160;<span id="projectnumber">8.3.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('dc/d41/namespacenlohmann_1_1detail_1_1dtoa__impl.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">nlohmann::detail::dtoa_impl Namespace Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>implements the Grisu2 algorithm for binary to decimal floating-point conversion.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/ddb/structnlohmann_1_1detail_1_1dtoa__impl_1_1boundaries.html">boundaries</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/dfe/structnlohmann_1_1detail_1_1dtoa__impl_1_1cached__power.html">cached_power</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d54/structnlohmann_1_1detail_1_1dtoa__impl_1_1diyfp.html">diyfp</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a1c5d30eb51e5e994a3f48bde104d2ce8"><td class="memTemplParams" colspan="2">template&lt;typename Target , typename Source &gt; </td></tr>
<tr class="memitem:a1c5d30eb51e5e994a3f48bde104d2ce8"><td class="memTemplItemLeft" align="right" valign="top">Target&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../dc/d41/namespacenlohmann_1_1detail_1_1dtoa__impl.html#a1c5d30eb51e5e994a3f48bde104d2ce8">reinterpret_bits</a> (const Source source)</td></tr>
<tr class="separator:a1c5d30eb51e5e994a3f48bde104d2ce8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22b6e37654ac93c6d0d9c06ec1bf5ded"><td class="memTemplParams" colspan="2">template&lt;typename FloatType &gt; </td></tr>
<tr class="memitem:a22b6e37654ac93c6d0d9c06ec1bf5ded"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="../../df/ddb/structnlohmann_1_1detail_1_1dtoa__impl_1_1boundaries.html">boundaries</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../dc/d41/namespacenlohmann_1_1detail_1_1dtoa__impl.html#a22b6e37654ac93c6d0d9c06ec1bf5ded">compute_boundaries</a> (FloatType value)</td></tr>
<tr class="separator:a22b6e37654ac93c6d0d9c06ec1bf5ded"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adbf329a18c5cf854a3477327afd2200b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d5/dfe/structnlohmann_1_1detail_1_1dtoa__impl_1_1cached__power.html">cached_power</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d41/namespacenlohmann_1_1detail_1_1dtoa__impl.html#adbf329a18c5cf854a3477327afd2200b">get_cached_power_for_binary_exponent</a> (int e)</td></tr>
<tr class="separator:adbf329a18c5cf854a3477327afd2200b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36ded358763b5dbcea9867660fbe4e28"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d41/namespacenlohmann_1_1detail_1_1dtoa__impl.html#a36ded358763b5dbcea9867660fbe4e28">find_largest_pow10</a> (const std::uint32_t n, std::uint32_t &amp;pow10)</td></tr>
<tr class="separator:a36ded358763b5dbcea9867660fbe4e28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bc841e0bee12fd6489d49cf7bd07bb4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../dc/df0/namespacenlohmann_1_1detail.html#a59fca69799f6b9e366710cb9043aa77d">void</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d41/namespacenlohmann_1_1detail_1_1dtoa__impl.html#a5bc841e0bee12fd6489d49cf7bd07bb4">grisu2_round</a> (char *buf, int len, std::uint64_t dist, std::uint64_t delta, std::uint64_t rest, std::uint64_t ten_k)</td></tr>
<tr class="separator:a5bc841e0bee12fd6489d49cf7bd07bb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b899c72b0e1e3dd46d75c2b4e6bcdfb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../dc/df0/namespacenlohmann_1_1detail.html#a59fca69799f6b9e366710cb9043aa77d">void</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d41/namespacenlohmann_1_1detail_1_1dtoa__impl.html#a9b899c72b0e1e3dd46d75c2b4e6bcdfb">grisu2_digit_gen</a> (char *buffer, int &amp;length, int &amp;decimal_exponent, <a class="el" href="../../d4/d54/structnlohmann_1_1detail_1_1dtoa__impl_1_1diyfp.html">diyfp</a> M_minus, <a class="el" href="../../d4/d54/structnlohmann_1_1detail_1_1dtoa__impl_1_1diyfp.html">diyfp</a> w, <a class="el" href="../../d4/d54/structnlohmann_1_1detail_1_1dtoa__impl_1_1diyfp.html">diyfp</a> M_plus)</td></tr>
<tr class="separator:a9b899c72b0e1e3dd46d75c2b4e6bcdfb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05b681dcb8569b9784c6dccfadb01633"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../dc/df0/namespacenlohmann_1_1detail.html#a59fca69799f6b9e366710cb9043aa77d">void</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d41/namespacenlohmann_1_1detail_1_1dtoa__impl.html#a05b681dcb8569b9784c6dccfadb01633">grisu2</a> (char *buf, int &amp;len, int &amp;decimal_exponent, <a class="el" href="../../d4/d54/structnlohmann_1_1detail_1_1dtoa__impl_1_1diyfp.html">diyfp</a> m_minus, <a class="el" href="../../d4/d54/structnlohmann_1_1detail_1_1dtoa__impl_1_1diyfp.html">diyfp</a> v, <a class="el" href="../../d4/d54/structnlohmann_1_1detail_1_1dtoa__impl_1_1diyfp.html">diyfp</a> m_plus)</td></tr>
<tr class="separator:a05b681dcb8569b9784c6dccfadb01633"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab7a9670a4f4704a5d0347ad7588576b"><td class="memTemplParams" colspan="2">template&lt;typename FloatType &gt; </td></tr>
<tr class="memitem:aab7a9670a4f4704a5d0347ad7588576b"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="../../dc/df0/namespacenlohmann_1_1detail.html#a59fca69799f6b9e366710cb9043aa77d">void</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../dc/d41/namespacenlohmann_1_1detail_1_1dtoa__impl.html#aab7a9670a4f4704a5d0347ad7588576b">grisu2</a> (char *buf, int &amp;len, int &amp;decimal_exponent, FloatType value)</td></tr>
<tr class="separator:aab7a9670a4f4704a5d0347ad7588576b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad90f19ed10d8133b727df4b9bc5ddf5c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d5/db8/json_8hpp.html#a5f2aaec3b681d0a72f7d6e90b70cdcd1">JSON_HEDLEY_RETURNS_NON_NULL</a> char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d41/namespacenlohmann_1_1detail_1_1dtoa__impl.html#ad90f19ed10d8133b727df4b9bc5ddf5c">append_exponent</a> (char *buf, int e)</td></tr>
<tr class="memdesc:ad90f19ed10d8133b727df4b9bc5ddf5c"><td class="mdescLeft">&#160;</td><td class="mdescRight">appends a decimal representation of e to buf  <a href="#ad90f19ed10d8133b727df4b9bc5ddf5c">More...</a><br /></td></tr>
<tr class="separator:ad90f19ed10d8133b727df4b9bc5ddf5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab441f2761e33839ca48bc2225e14a2a9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d5/db8/json_8hpp.html#a5f2aaec3b681d0a72f7d6e90b70cdcd1">JSON_HEDLEY_RETURNS_NON_NULL</a> char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d41/namespacenlohmann_1_1detail_1_1dtoa__impl.html#ab441f2761e33839ca48bc2225e14a2a9">format_buffer</a> (char *buf, int len, int decimal_exponent, int min_exp, int max_exp)</td></tr>
<tr class="memdesc:ab441f2761e33839ca48bc2225e14a2a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">prettify v = buf * 10^decimal_exponent  <a href="#ab441f2761e33839ca48bc2225e14a2a9">More...</a><br /></td></tr>
<tr class="separator:ab441f2761e33839ca48bc2225e14a2a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ac1ea1316de0b4a219f707c76b1db1966"><td class="memItemLeft" align="right" valign="top">constexpr int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d41/namespacenlohmann_1_1detail_1_1dtoa__impl.html#ac1ea1316de0b4a219f707c76b1db1966">kAlpha</a> = -60</td></tr>
<tr class="separator:ac1ea1316de0b4a219f707c76b1db1966"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a750fcc38da1ce68b7e25ab3a230e20"><td class="memItemLeft" align="right" valign="top">constexpr int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d41/namespacenlohmann_1_1detail_1_1dtoa__impl.html#a4a750fcc38da1ce68b7e25ab3a230e20">kGamma</a> = -32</td></tr>
<tr class="separator:a4a750fcc38da1ce68b7e25ab3a230e20"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>implements the Grisu2 algorithm for binary to decimal floating-point conversion. </p>
<p>This implementation is a slightly modified version of the reference implementation which may be obtained from <a href="http://florian.loitsch.com/publications">http://florian.loitsch.com/publications</a> (bench.tar.gz).</p>
<p>The code is distributed under the MIT license, Copyright (c) 2009 Florian Loitsch.</p>
<p>For a detailed description of the algorithm see:</p>
<p>[1] Loitsch, "Printing Floating-Point Numbers Quickly and Accurately with
    Integers", Proceedings of the ACM SIGPLAN 2010 Conference on Programming Language Design and Implementation, PLDI 2010 [2] Burger, Dybvig, "Printing Floating-Point Numbers Quickly and Accurately", Proceedings of the ACM SIGPLAN 1996 Conference on Programming Language Design and Implementation, PLDI 1996 </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ad90f19ed10d8133b727df4b9bc5ddf5c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad90f19ed10d8133b727df4b9bc5ddf5c">&#9670;&nbsp;</a></span>append_exponent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d5/db8/json_8hpp.html#a5f2aaec3b681d0a72f7d6e90b70cdcd1">JSON_HEDLEY_RETURNS_NON_NULL</a> char* nlohmann::detail::dtoa_impl::append_exponent </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>e</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>appends a decimal representation of e to buf </p>
<dl class="section return"><dt>Returns</dt><dd>a pointer to the element following the exponent. </dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd>-1000 &lt; e &lt; 1000 </dd></dl>

<p class="definition">Definition at line <a class="el" href="../../d5/db8/json_8hpp_source.html#l15768">15768</a> of file <a class="el" href="../../d5/db8/json_8hpp_source.html">json.hpp</a>.</p>

<p class="reference">References <a class="el" href="../../d5/db8/json_8hpp_source.html#l02292">JSON_ASSERT</a>, <a class="el" href="../../d5/db8/json_8hpp_source.html#l01456">JSON_HEDLEY_NON_NULL</a>, and <a class="el" href="../../d5/db8/json_8hpp_source.html#l01897">JSON_HEDLEY_RETURNS_NON_NULL</a>.</p>

<p class="reference">Referenced by <a class="el" href="../../d5/db8/json_8hpp_source.html#l15820">format_buffer()</a>.</p>

</div>
</div>
<a id="a22b6e37654ac93c6d0d9c06ec1bf5ded"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a22b6e37654ac93c6d0d9c06ec1bf5ded">&#9670;&nbsp;</a></span>compute_boundaries()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename FloatType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/ddb/structnlohmann_1_1detail_1_1dtoa__impl_1_1boundaries.html">boundaries</a> nlohmann::detail::dtoa_impl::compute_boundaries </td>
          <td>(</td>
          <td class="paramtype">FloatType&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Compute the (normalized) diyfp representing the input number 'value' and its boundaries.</p>
<dl class="section pre"><dt>Precondition</dt><dd>value must be finite and positive </dd></dl>

<p class="definition">Definition at line <a class="el" href="../../d5/db8/json_8hpp_source.html#l15029">15029</a> of file <a class="el" href="../../d5/db8/json_8hpp_source.html">json.hpp</a>.</p>

<p class="reference">References <a class="el" href="../../d5/db8/json_8hpp_source.html#l14902">nlohmann::detail::dtoa_impl::diyfp::e</a>, <a class="el" href="../../d5/db8/json_8hpp_source.html#l14901">nlohmann::detail::dtoa_impl::diyfp::f</a>, <a class="el" href="../../d5/db8/json_8hpp_source.html#l02292">JSON_ASSERT</a>, and <a class="el" href="../../dc/df0/namespacenlohmann_1_1detail.html#a2fb6dae6578e06ae73ca0d7cc8512b1aa2063c1608d6e0baf80249c42e2be5804">nlohmann::detail::value</a>.</p>

<p class="reference">Referenced by <a class="el" href="../../d5/db8/json_8hpp_source.html#l15728">grisu2()</a>.</p>

</div>
</div>
<a id="a36ded358763b5dbcea9867660fbe4e28"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a36ded358763b5dbcea9867660fbe4e28">&#9670;&nbsp;</a></span>find_largest_pow10()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int nlohmann::detail::dtoa_impl::find_largest_pow10 </td>
          <td>(</td>
          <td class="paramtype">const std::uint32_t&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::uint32_t &amp;&#160;</td>
          <td class="paramname"><em>pow10</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>For n != 0, returns k, such that pow10 := 10^(k-1) &lt;= n &lt; 10^k. For n == 0, returns 1 and sets pow10 := 1. </p>

<p class="definition">Definition at line <a class="el" href="../../d5/db8/json_8hpp_source.html#l15332">15332</a> of file <a class="el" href="../../d5/db8/json_8hpp_source.html">json.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="../../d5/db8/json_8hpp_source.html#l15427">grisu2_digit_gen()</a>.</p>

</div>
</div>
<a id="ab441f2761e33839ca48bc2225e14a2a9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab441f2761e33839ca48bc2225e14a2a9">&#9670;&nbsp;</a></span>format_buffer()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d5/db8/json_8hpp.html#a5f2aaec3b681d0a72f7d6e90b70cdcd1">JSON_HEDLEY_RETURNS_NON_NULL</a> char* nlohmann::detail::dtoa_impl::format_buffer </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>decimal_exponent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>min_exp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>max_exp</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>prettify v = buf * 10^decimal_exponent </p>
<p>If v is in the range [10^min_exp, 10^max_exp) it will be printed in fixed-point notation. Otherwise it will be printed in exponential notation.</p>
<dl class="section pre"><dt>Precondition</dt><dd>min_exp &lt; 0 </dd>
<dd>
max_exp &gt; 0 </dd></dl>

<p class="definition">Definition at line <a class="el" href="../../d5/db8/json_8hpp_source.html#l15820">15820</a> of file <a class="el" href="../../d5/db8/json_8hpp_source.html">json.hpp</a>.</p>

<p class="reference">References <a class="el" href="../../d5/db8/json_8hpp_source.html#l15768">append_exponent()</a>, <a class="el" href="../../d5/db8/json_8hpp_source.html#l02292">JSON_ASSERT</a>, <a class="el" href="../../d5/db8/json_8hpp_source.html#l01456">JSON_HEDLEY_NON_NULL</a>, and <a class="el" href="../../d5/db8/json_8hpp_source.html#l01897">JSON_HEDLEY_RETURNS_NON_NULL</a>.</p>

<p class="reference">Referenced by <a class="el" href="../../d5/db8/json_8hpp_source.html#l15905">nlohmann::detail::to_chars()</a>.</p>

</div>
</div>
<a id="adbf329a18c5cf854a3477327afd2200b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adbf329a18c5cf854a3477327afd2200b">&#9670;&nbsp;</a></span>get_cached_power_for_binary_exponent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d5/dfe/structnlohmann_1_1detail_1_1dtoa__impl_1_1cached__power.html">cached_power</a> nlohmann::detail::dtoa_impl::get_cached_power_for_binary_exponent </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>e</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>For a normalized diyfp w = f * 2^e, this function returns a (normalized) cached power-of-ten c = f_c * 2^e_c, such that the exponent of the product w * c satisfies (Definition 3.2 from [1]) </p><pre class="fragment"> alpha &lt;= e_c + e + q &lt;= gamma.</pre> 
<p class="definition">Definition at line <a class="el" href="../../d5/db8/json_8hpp_source.html#l15168">15168</a> of file <a class="el" href="../../d5/db8/json_8hpp_source.html">json.hpp</a>.</p>

<p class="reference">References <a class="el" href="../../d5/db8/json_8hpp_source.html#l02292">JSON_ASSERT</a>.</p>

<p class="reference">Referenced by <a class="el" href="../../d5/db8/json_8hpp_source.html#l15668">grisu2()</a>.</p>

</div>
</div>
<a id="a05b681dcb8569b9784c6dccfadb01633"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05b681dcb8569b9784c6dccfadb01633">&#9670;&nbsp;</a></span>grisu2() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/df0/namespacenlohmann_1_1detail.html#a59fca69799f6b9e366710cb9043aa77d">void</a> nlohmann::detail::dtoa_impl::grisu2 </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>decimal_exponent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d4/d54/structnlohmann_1_1detail_1_1dtoa__impl_1_1diyfp.html">diyfp</a>&#160;</td>
          <td class="paramname"><em>m_minus</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d4/d54/structnlohmann_1_1detail_1_1dtoa__impl_1_1diyfp.html">diyfp</a>&#160;</td>
          <td class="paramname"><em>v</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d4/d54/structnlohmann_1_1detail_1_1dtoa__impl_1_1diyfp.html">diyfp</a>&#160;</td>
          <td class="paramname"><em>m_plus</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>v = buf * 10^decimal_exponent len is the length of the buffer (number of decimal digits) The buffer must be large enough, i.e. &gt;= max_digits10. </p>

<p class="definition">Definition at line <a class="el" href="../../d5/db8/json_8hpp_source.html#l15668">15668</a> of file <a class="el" href="../../d5/db8/json_8hpp_source.html">json.hpp</a>.</p>

<p class="reference">References <a class="el" href="../../d5/db8/json_8hpp_source.html#l14902">nlohmann::detail::dtoa_impl::diyfp::e</a>, <a class="el" href="../../d5/db8/json_8hpp_source.html#l15157">nlohmann::detail::dtoa_impl::cached_power::e</a>, <a class="el" href="../../d5/db8/json_8hpp_source.html#l14901">nlohmann::detail::dtoa_impl::diyfp::f</a>, <a class="el" href="../../d5/db8/json_8hpp_source.html#l15156">nlohmann::detail::dtoa_impl::cached_power::f</a>, <a class="el" href="../../d5/db8/json_8hpp_source.html#l15168">get_cached_power_for_binary_exponent()</a>, <a class="el" href="../../d5/db8/json_8hpp_source.html#l15427">grisu2_digit_gen()</a>, <a class="el" href="../../d5/db8/json_8hpp_source.html#l02292">JSON_ASSERT</a>, <a class="el" href="../../d5/db8/json_8hpp_source.html#l01456">JSON_HEDLEY_NON_NULL</a>, and <a class="el" href="../../d5/db8/json_8hpp_source.html#l15158">nlohmann::detail::dtoa_impl::cached_power::k</a>.</p>

<p class="reference">Referenced by <a class="el" href="../../d5/db8/json_8hpp_source.html#l15905">nlohmann::detail::to_chars()</a>.</p>

</div>
</div>
<a id="aab7a9670a4f4704a5d0347ad7588576b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aab7a9670a4f4704a5d0347ad7588576b">&#9670;&nbsp;</a></span>grisu2() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename FloatType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/df0/namespacenlohmann_1_1detail.html#a59fca69799f6b9e366710cb9043aa77d">void</a> nlohmann::detail::dtoa_impl::grisu2 </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>decimal_exponent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FloatType&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>v = buf * 10^decimal_exponent len is the length of the buffer (number of decimal digits) The buffer must be large enough, i.e. &gt;= max_digits10. </p>

<p class="definition">Definition at line <a class="el" href="../../d5/db8/json_8hpp_source.html#l15728">15728</a> of file <a class="el" href="../../d5/db8/json_8hpp_source.html">json.hpp</a>.</p>

<p class="reference">References <a class="el" href="../../d5/db8/json_8hpp_source.html#l15029">compute_boundaries()</a>, <a class="el" href="../../d5/db8/json_8hpp_source.html#l02292">JSON_ASSERT</a>, <a class="el" href="../../d5/db8/json_8hpp_source.html#l01456">JSON_HEDLEY_NON_NULL</a>, <a class="el" href="../../d5/db8/json_8hpp_source.html#l01897">JSON_HEDLEY_RETURNS_NON_NULL</a>, <a class="el" href="../../d5/db8/json_8hpp_source.html#l15018">nlohmann::detail::dtoa_impl::boundaries::minus</a>, <a class="el" href="../../d5/db8/json_8hpp_source.html#l15019">nlohmann::detail::dtoa_impl::boundaries::plus</a>, and <a class="el" href="../../d5/db8/json_8hpp_source.html#l15017">nlohmann::detail::dtoa_impl::boundaries::w</a>.</p>

</div>
</div>
<a id="a9b899c72b0e1e3dd46d75c2b4e6bcdfb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b899c72b0e1e3dd46d75c2b4e6bcdfb">&#9670;&nbsp;</a></span>grisu2_digit_gen()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/df0/namespacenlohmann_1_1detail.html#a59fca69799f6b9e366710cb9043aa77d">void</a> nlohmann::detail::dtoa_impl::grisu2_digit_gen </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>decimal_exponent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d4/d54/structnlohmann_1_1detail_1_1dtoa__impl_1_1diyfp.html">diyfp</a>&#160;</td>
          <td class="paramname"><em>M_minus</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d4/d54/structnlohmann_1_1detail_1_1dtoa__impl_1_1diyfp.html">diyfp</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d4/d54/structnlohmann_1_1detail_1_1dtoa__impl_1_1diyfp.html">diyfp</a>&#160;</td>
          <td class="paramname"><em>M_plus</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Generates V = buffer * 10^decimal_exponent, such that M- &lt;= V &lt;= M+. M- and M+ must be normalized and share the same exponent -60 &lt;= e &lt;= -32. </p>

<p class="definition">Definition at line <a class="el" href="../../d5/db8/json_8hpp_source.html#l15427">15427</a> of file <a class="el" href="../../d5/db8/json_8hpp_source.html">json.hpp</a>.</p>

<p class="reference">References <a class="el" href="../../d5/db8/json_8hpp_source.html#l14902">nlohmann::detail::dtoa_impl::diyfp::e</a>, <a class="el" href="../../d5/db8/json_8hpp_source.html#l14901">nlohmann::detail::dtoa_impl::diyfp::f</a>, <a class="el" href="../../d5/db8/json_8hpp_source.html#l15332">find_largest_pow10()</a>, <a class="el" href="../../d5/db8/json_8hpp_source.html#l15386">grisu2_round()</a>, <a class="el" href="../../d5/db8/json_8hpp_source.html#l02292">JSON_ASSERT</a>, and <a class="el" href="../../d5/db8/json_8hpp_source.html#l01456">JSON_HEDLEY_NON_NULL</a>.</p>

<p class="reference">Referenced by <a class="el" href="../../d5/db8/json_8hpp_source.html#l15668">grisu2()</a>.</p>

</div>
</div>
<a id="a5bc841e0bee12fd6489d49cf7bd07bb4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5bc841e0bee12fd6489d49cf7bd07bb4">&#9670;&nbsp;</a></span>grisu2_round()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/df0/namespacenlohmann_1_1detail.html#a59fca69799f6b9e366710cb9043aa77d">void</a> nlohmann::detail::dtoa_impl::grisu2_round </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::uint64_t&#160;</td>
          <td class="paramname"><em>dist</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::uint64_t&#160;</td>
          <td class="paramname"><em>delta</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::uint64_t&#160;</td>
          <td class="paramname"><em>rest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::uint64_t&#160;</td>
          <td class="paramname"><em>ten_k</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="../../d5/db8/json_8hpp_source.html#l15386">15386</a> of file <a class="el" href="../../d5/db8/json_8hpp_source.html">json.hpp</a>.</p>

<p class="reference">References <a class="el" href="../../d5/db8/json_8hpp_source.html#l02292">JSON_ASSERT</a>.</p>

<p class="reference">Referenced by <a class="el" href="../../d5/db8/json_8hpp_source.html#l15427">grisu2_digit_gen()</a>.</p>

</div>
</div>
<a id="a1c5d30eb51e5e994a3f48bde104d2ce8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1c5d30eb51e5e994a3f48bde104d2ce8">&#9670;&nbsp;</a></span>reinterpret_bits()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Target , typename Source &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">Target nlohmann::detail::dtoa_impl::reinterpret_bits </td>
          <td>(</td>
          <td class="paramtype">const Source&#160;</td>
          <td class="paramname"><em>source</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="../../d5/db8/json_8hpp_source.html#l14888">14888</a> of file <a class="el" href="../../d5/db8/json_8hpp_source.html">json.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="ac1ea1316de0b4a219f707c76b1db1966"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac1ea1316de0b4a219f707c76b1db1966">&#9670;&nbsp;</a></span>kAlpha</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">constexpr int nlohmann::detail::dtoa_impl::kAlpha = -60</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="../../d5/db8/json_8hpp_source.html#l15151">15151</a> of file <a class="el" href="../../d5/db8/json_8hpp_source.html">json.hpp</a>.</p>

</div>
</div>
<a id="a4a750fcc38da1ce68b7e25ab3a230e20"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4a750fcc38da1ce68b7e25ab3a230e20">&#9670;&nbsp;</a></span>kGamma</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">constexpr int nlohmann::detail::dtoa_impl::kGamma = -32</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="../../d5/db8/json_8hpp_source.html#l15152">15152</a> of file <a class="el" href="../../d5/db8/json_8hpp_source.html">json.hpp</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../d3/d9b/namespacenlohmann.html">nlohmann</a></li><li class="navelem"><a class="el" href="../../dc/df0/namespacenlohmann_1_1detail.html">detail</a></li><li class="navelem"><a class="el" href="../../dc/d41/namespacenlohmann_1_1detail_1_1dtoa__impl.html">dtoa_impl</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
